﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pGrid
{
	[Serializable]
	class City
	{
		// идентификаторы игроков, подключившихся к городу
		private int m_player1_id;
		private int m_player2_id;
		private int m_player3_id;

		// заняты ли места по 10, 15 и 20 в городе
		private bool first_place_is_free;
		private bool second_place_is_free;
		private bool third_place_is_free;

		// стоимость соединений с соседними городами
		private int m_connection1_cost;
		private int m_connection2_cost;
		private int m_connection3_cost;
		private int m_connection4_cost;
		private int m_connection5_cost;
		private int m_connection6_cost;
		private int m_connection7_cost;
		private int m_connection8_cost;
	
		private string m_name;

		public City(string name, int cost1, int cost2, int cost3 = 0, int cost4 = 0, int cost5 = 0, int cost6 = 0, int cost7 = 0, int cost8 = 0)
		{
			this.m_name = name;
			this.m_connection1_cost = cost1;
			this.m_connection2_cost = cost2;
			this.m_connection3_cost = cost3;
			this.m_connection4_cost = cost4;
			this.m_connection5_cost = cost5;
			this.m_connection6_cost = cost6;
			this.m_connection7_cost = cost7;
			this.m_connection8_cost = cost8;
			this.first_place_is_free = true;
			this.second_place_is_free = true;
			this.third_place_is_free = true;
		}

		public City()
		{
			
		}

		public bool FirstPlaceFree
		{
			get
			{
				return this.first_place_is_free;
			}
			set
			{
				this.first_place_is_free = value;
			}
		}

		public int ConnectionCost1
		{
			get
			{
				return this.m_connection1_cost;
			}
			set
			{
				this.m_connection1_cost = value;
			}
		}

		public int ConnectionCost2
		{
			get
			{
				return this.m_connection2_cost;
			}
			set
			{
				this.m_connection2_cost = value;
			}
		}

		public int ConnectionCost3
		{
			get
			{
				return this.m_connection3_cost;
			}
			set
			{
				this.m_connection3_cost = value;
			}
		}

		public int ConnectionCost4
		{
			get
			{
				return this.m_connection4_cost;
			}
			set
			{
				this.m_connection4_cost = value;
			}
		}

		public int ConnectionCost5
		{
			get
			{
				return this.m_connection5_cost;
			}
			set
			{
				this.m_connection5_cost = value;
			}
		}

		public int ConnectionCost6
		{
			get
			{
				return this.m_connection6_cost;
			}
			set
			{
				this.m_connection6_cost = value;
			}
		}

		public int ConnectionCost7
		{
			get
			{
				return this.m_connection7_cost;
			}
			set
			{
				this.m_connection7_cost = value;
			}
		}

		public int ConnectionCost8
		{
			get
			{
				return this.m_connection8_cost;
			}
			set
			{
				this.m_connection8_cost = value;
			}
		}

		public string Name
		{
			get
			{
				return this.m_name;
			}
			set
			{
				this.m_name = value;
			}
		}

		public int PlayerId1
		{
			get
			{
				return this.m_player1_id;
			}
			set
			{
				this.m_player1_id = value;
			}
		}

		public int PlayerId2
		{
			get
			{
				return this.m_player2_id;
			}
			set
			{
				this.m_player2_id = value;
			}
		}

		public int PlayerId3
		{
			get
			{
				return this.m_player3_id;
			}
			set
			{
				this.m_player3_id = value;
			}
		}

		public bool SecondPlaceFree
		{
			get
			{
				return this.second_place_is_free;
			}
			set
			{
				this.second_place_is_free = value;
			}
		}

		public bool ThirdPlaceFree
		{
			get
			{
				return this.third_place_is_free;
			}
			set
			{
				this.third_place_is_free = value;
			}
		}
	}
}
